home *** CD-ROM | disk | FTP | other *** search
- on _GoBack vFrame, VMovie
- sound stop 1
- sound stop 2
- leaveDemo()
- end
-
- on FadeMyVolume theChannel, theTime, theGrain, theLevelMac, theLevelPC
- if machineType() < 255 then
- set theLevel to theLevelMac
- else
- set theLevel to theLevelPC
- end if
- puppetTempo(theTime)
- if theChannel = 3 then
- repeat while (the volume of sound 1 > theLevel) or (the volume of sound 2 > theLevel)
- if the volume of sound 1 > theLevel then
- set the volume of sound 1 to the volume of sound 1 - theGrain
- end if
- if the volume of sound 2 > theLevel then
- set the volume of sound 2 to the volume of sound 2 - theGrain
- end if
- pWait(theTime)
- end repeat
- if theLevel = 0 then
- sound stop 1
- sound stop 2
- end if
- else
- repeat while the volume of sound theChannel > theLevel
- set the volume of sound theChannel to the volume of sound theChannel - theGrain
- pWait(theTime)
- end repeat
- if theLevel = 0 then
- sound stop theChannel
- end if
- end if
- end
-
- on setMyVolume theChannel, theMacVol, thePCVol
- if machineType() < 255 then
- set the volume of sound theChannel to theMacVol
- else
- set the volume of sound theChannel to thePCVol
- end if
- end
-
- on pWait theSecs
- set tmpTicks to the ticks
- repeat while the ticks < (tmpTicks + (theSecs * 60))
- if the mouseDown then
- set vMouseCast to the mouseCast
- if vMouseCast > 1 then
- if the name of cast the mouseCast = "Edmark.BTN" then
- exit
- end if
- end if
- end if
- if (the commandDown and (the key = "Q")) or (the commandDown and (the key = ".")) then
- exit
- end if
- end repeat
- end
-
- on waitSound theChannel
- repeat while soundBusy(theChannel)
- if the mouseDown then
- set vMouseCast to the mouseCast
- if vMouseCast > 1 then
- if the name of cast the mouseCast = "Edmark.BTN" then
- exit
- end if
- end if
- end if
- if (the commandDown and (the key = "Q")) or (the commandDown and (the key = ".")) then
- exit
- end if
- end repeat
- end
-
- on _waitSound theChannel
- repeat while soundBusy(theChannel)
- if the mouseDown then
- set vMouseCast to the mouseCast
- if vMouseCast > 1 then
- if the name of cast the mouseCast = "Edmark.BTN" then
- exit
- end if
- end if
- end if
- if (the commandDown and (the key = "Q")) or (the commandDown and (the key = ".")) then
- exit
- end if
- end repeat
- end
-
- on LoopOnSound theChannel, theMarker
- set mm to theMarker
- set cc to theChannel
- if value(mm) = EMPTY then
- if soundBusy(cc) then
- go(mm)
- end if
- else
- if soundBusy(cc) then
- go(marker(mm))
- end if
- end if
- end
-
- on LoopOnTime theSeconds, theMarker
- global tempTimer
- set mm to theMarker
- set ss to theSeconds
- if tempTimer > 0 then
- if tempTimer < the ticks then
- go(the frame + 1)
- set tempTimer to 0
- else
- go(marker(mm))
- end if
- else
- set tempTimer to the ticks + (theSeconds * 60)
- go(marker(mm))
- end if
- end
-